package com.futu.common.exceptions;





import com.futu.common.enums.BaseExceptionEnum;
import lombok.Data;

@Data
public class ApiException extends RuntimeException{

	public Integer code;
	public String msg;
	public ApiException(BaseExceptionEnum baseExceptionEnum) {
		super(baseExceptionEnum.getMessage());
		this.code = baseExceptionEnum.getCode();
		this.msg = baseExceptionEnum.getMessage();
	}
	public ApiException(String message) {
		super(message);
		this.code=101;
		this.msg=message;
	}
	public ApiException(Integer code, String message) {
		super(message);
		this.code=code;
		this.msg=message;
	}

}
